<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	template="web/templates/lg.xhtml">
	<ui:define name="title">
		<h:outputText value="Cambiar Clave" />
	</ui:define>
	<ui:define name="body">
		<div class="container">
			<div class="iso"></div>
			<h:form styleClass="loginForm">
				<p:panel id="password">
					<p:messages id="messages" autoUpdate="true" />
					<p:fieldset>
						<div class="fieldsetTitle">
							<h3>Recuperar Contraseña</h3>
						</div>					 
						
						<div class="row">
							<div class="col-sm-6 form-group">
								<p:outputLabel for="correoElectronico" value="Correo Electrónico: "/>
								<p:inputText id="correoElectronico" styleClass="form-control text-transform-none" style="width:300px;" value="#{claveService.correoElectronico}"  required="true"  requiredMessage="Correo Electronico: Campo Obligatorio."
									placeholder="Ingrese Correo Electrónico"  label="Correo Electrónico" validatorMessage="El Campo 'Correo Electrónico' no cumple con el formato.">
									<f:validateRegex pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
								</p:inputText>
							</div>
						</div>
					
						<hr></hr>
						<div class="btnCanvas form-group">
							<div class="btnAction row">
								<div class="text-right">
									<p:link href="/" value="Cancelar" styleClass="btn btn-view"/>
									&nbsp;
									<p:commandButton update="password" value="Recuperar" actionListener="#{claveService.recuperarClave()}" styleClass="btn btn--primario"  icon="ui-menuitem-icon ui-icon fa fa-envelope-o" iconPos="right"/>
								</div>
							</div>
						</div>

						<br></br>
					</p:fieldset>
				</p:panel>
			</h:form>
		</div>
		<p:confirmDialog global="true" showEffect="fade" hideEffect="fade" closeOnEscape="true" rendered="true">
			<p:commandButton value="Si" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
			<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
		</p:confirmDialog>
	</ui:define>
</ui:composition>